package com.snailct.bpp.client.component.base;

import com.snailct.bpp.client.component.base.service.IUserService;
import com.snailct.bpp.service.core.commons.DefaultService;
import com.snailct.bpp.service.core.commons.IService;
import com.snailct.bpp.service.core.definition.ServiceDefinition;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by Administrator on 2016/9/5 0005.
 */
@RestController
@EnableAutoConfiguration
@ImportResource("classpath:spring/spring-commons-config.xml")
@ComponentScan(basePackages = {"com.snailct.bpp"})
public class ComponentBaseApplication {

    @RequestMapping("/component/UserService")
    public String execute(String reqData){
        IService service = new DefaultService();
        return service.execute(reqData);
    }
    public static void main(String[] args) {

        SpringApplication app = new SpringApplication(ComponentBaseApplication.class);
        app.run(args);
    }
}
